import { createApp } from 'vue'
import './style.css'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/styles/index.scss'
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import router from './router'
import pinia from './store'
//引入路由鉴权文件
import "./permission";
import { isHasButton } from "./directive/has.ts";
//引入饿了么插件和样式
//获取应用实例对象
const app=createApp(App)
//引入自定义指令方法
isHasButton(app)
app.use(ElementPlus,{
    locale:zhCn
});
console.log(import.meta.env)
// 入口文件导入svg插件配置代码
import 'virtual:svg-icons-register'
//引入自定义插件对象：注册整个项目全局组件
import globalComponent from  '@/components'
app.use(globalComponent)
app.use(router)
app.use(pinia)
// 将应用挂载到挂载点上
app.mount('#app')





